#include "QOgreStats.h"

QOgreStats* QOgreStats::instance = NULL;
QOgreStats* QOgreStats::getInstance(){
	if ( instance == NULL )	{
		instance = new QOgreStats();
	}
	return instance;
}

QOgreStats::QOgreStats()
{
	ui.setupUi(this);
}

QOgreStats::~QOgreStats()
{

}

void QOgreStats::updateCurrentFPS( float stat ){
	updateStat( ui.currentFPS, stat );
}

void QOgreStats::updateAvgFPS( float stat ){
	updateStat( ui.avgFPS, stat );
}

void QOgreStats::updateBestFPS( float stat ){
	updateStat( ui.bestFPS, stat );
}

void QOgreStats::updateWorstFPS( float stat ){
	updateStat( ui.worstFPS, stat );
}

void QOgreStats::updateTriCount( float stat ){
	updateStat( ui.triCount, stat );
}

void QOgreStats::updateStat( QLabel *targetLabel, float stat ){
	targetLabel->setText( QString::number(stat) );
}
